/*
 Navicat Premium Dump SQL

 Source Server         : SQL Server
 Source Server Type    : SQL Server
 Source Server Version : 16001000 (16.00.1000)
 Source Catalog        : UCSTDB
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 16001000 (16.00.1000)
 File Encoding         : 65001

 Date: 18/07/2025 15:02:59
*/


-- ----------------------------
-- Table structure for LoginHistory_TB
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[LoginHistory_TB]') AND type IN ('U'))
	DROP TABLE [dbo].[LoginHistory_TB]
GO

CREATE TABLE [dbo].[LoginHistory_TB] (
  [ID] int  NULL,
  [LoginName] nvarchar(254) COLLATE Chinese_PRC_CI_AS  NULL,
  [LoginTime] nvarchar(254) COLLATE Chinese_PRC_CI_AS  NULL,
  [LogoutTime] nvarchar(254) COLLATE Chinese_PRC_CI_AS  NULL,
  [Operation] int  NULL
)
GO

ALTER TABLE [dbo].[LoginHistory_TB] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of LoginHistory_TB
-- ----------------------------
INSERT INTO [dbo].[LoginHistory_TB] ([ID], [LoginName], [LoginTime], [LogoutTime], [Operation]) VALUES (N'1', N'卫雪', N'2021/1/8-08:32:49', N'2021/1/8-12:32:49', N'1111')
GO

INSERT INTO [dbo].[LoginHistory_TB] ([ID], [LoginName], [LoginTime], [LogoutTime], [Operation]) VALUES (N'2', N'夹谷利', N'2021/1/8-08:32:50', N'2021/1/8-12:32:50', N'11')
GO

INSERT INTO [dbo].[LoginHistory_TB] ([ID], [LoginName], [LoginTime], [LogoutTime], [Operation]) VALUES (N'3', N'牧彩', N'2021/1/8-08:32:61', N'2021/1/8-12:32:51', N'1')
GO


-- ----------------------------
-- Table structure for Roles
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Roles]') AND type IN ('U'))
	DROP TABLE [dbo].[Roles]
GO

CREATE TABLE [dbo].[Roles] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [Name] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Weight] int DEFAULT 99 NOT NULL
)
GO

ALTER TABLE [dbo].[Roles] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of Roles
-- ----------------------------
SET IDENTITY_INSERT [dbo].[Roles] ON
GO

INSERT INTO [dbo].[Roles] ([Id], [Name], [Weight]) VALUES (N'1', N'超级管理员', N'100')
GO

INSERT INTO [dbo].[Roles] ([Id], [Name], [Weight]) VALUES (N'2', N'厂长', N'98')
GO

INSERT INTO [dbo].[Roles] ([Id], [Name], [Weight]) VALUES (N'3', N'车间主任', N'97')
GO

INSERT INTO [dbo].[Roles] ([Id], [Name], [Weight]) VALUES (N'4', N'操作员', N'96')
GO

SET IDENTITY_INSERT [dbo].[Roles] OFF
GO


-- ----------------------------
-- Table structure for THRecords
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[THRecords]') AND type IN ('U'))
	DROP TABLE [dbo].[THRecords]
GO

CREATE TABLE [dbo].[THRecords] (
  [Id] int  IDENTITY(1,1) NOT NULL,
  [SlaveId] int  NOT NULL,
  [Temperature] float(53)  NOT NULL,
  [Humidity] float(53)  NOT NULL,
  [Creation] datetime  NOT NULL
)
GO

ALTER TABLE [dbo].[THRecords] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of THRecords
-- ----------------------------
SET IDENTITY_INSERT [dbo].[THRecords] ON
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'1', N'1', N'19.2', N'20.9', N'2025-01-07 11:50:18.887')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'2', N'1', N'30.8', N'16.2', N'2025-01-07 11:50:51.397')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'3', N'1', N'24.6', N'30.2', N'2025-01-07 11:51:22.733')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'4', N'1', N'42.8', N'20.6', N'2025-01-07 11:51:44.233')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'5', N'2', N'10.8', N'30.5', N'2025-01-07 11:52:04.707')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'6', N'2', N'16.8', N'28.6', N'2025-01-07 11:52:19.503')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'7', N'2', N'18.2', N'26.9', N'2025-01-07 11:52:39.107')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'8', N'2', N'36.6', N'22.8', N'2025-01-07 11:53:09.870')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'9', N'2', N'32.31', N'63.58', N'2025-01-07 23:36:35.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'10', N'1', N'31.2', N'41.82', N'2025-01-02 06:04:28.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'11', N'1', N'53.32', N'86.8', N'2025-01-06 03:24:27.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'12', N'2', N'8.97', N'32.66', N'2025-01-05 22:23:30.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'13', N'2', N'37.34', N'25.71', N'2025-01-02 20:31:14.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'14', N'2', N'27.24', N'67.47', N'2025-01-04 10:38:10.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'15', N'3', N'50.12', N'65.27', N'2025-01-04 08:51:52.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'16', N'1', N'36.13', N'54', N'2025-01-05 15:18:23.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'17', N'2', N'26.8', N'1.03', N'2025-01-04 03:47:48.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'18', N'2', N'54.89', N'11.27', N'2025-01-06 15:27:48.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'19', N'3', N'10', N'20.72', N'2025-01-05 22:31:18.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'20', N'1', N'41.11', N'63.12', N'2025-01-06 14:51:09.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'21', N'2', N'42.65', N'74.52', N'2025-01-01 12:19:58.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'22', N'1', N'21.49', N'26.26', N'2025-01-03 00:22:17.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'23', N'2', N'35.32', N'87.02', N'2025-01-03 04:42:24.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'24', N'2', N'13.81', N'23.78', N'2025-01-07 04:11:48.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'25', N'2', N'29.99', N'13.75', N'2025-01-05 21:20:35.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'26', N'2', N'40.25', N'19.69', N'2025-01-03 06:53:11.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'27', N'2', N'12.7', N'81.78', N'2025-01-02 06:34:16.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'28', N'3', N'45.55', N'28.37', N'2025-01-06 15:06:52.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'29', N'1', N'18.37', N'86.12', N'2025-01-10 03:28:21.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'30', N'1', N'41.78', N'67.8', N'2025-01-10 08:58:43.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'31', N'2', N'47.69', N'62.12', N'2025-01-08 10:06:18.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'32', N'2', N'6.59', N'66.8', N'2025-01-02 23:15:25.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'33', N'2', N'7.9', N'87.29', N'2025-01-10 22:37:19.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'34', N'2', N'53.26', N'61.65', N'2025-01-03 07:25:46.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'35', N'3', N'56.21', N'46.8', N'2025-01-09 05:15:49.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'36', N'2', N'24.16', N'13.92', N'2025-01-04 05:12:55.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'37', N'3', N'38.1', N'74.14', N'2025-01-09 14:25:17.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'38', N'2', N'10.59', N'67.61', N'2025-01-01 08:05:20.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'39', N'2', N'48.4', N'51.17', N'2025-01-07 22:49:52.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'40', N'3', N'48.45', N'38.75', N'2025-01-07 12:56:34.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'41', N'2', N'16.77', N'88.72', N'2025-01-05 03:04:36.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'42', N'3', N'51.61', N'48.37', N'2025-01-04 23:04:10.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'43', N'2', N'58.88', N'99.87', N'2025-01-05 03:12:31.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'44', N'2', N'3.39', N'32.06', N'2025-01-04 15:50:16.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'45', N'2', N'31.16', N'3.27', N'2025-01-03 16:36:03.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'46', N'1', N'43.46', N'30.62', N'2025-01-06 18:15:22.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'47', N'2', N'41.3', N'67.16', N'2025-01-03 18:46:43.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'48', N'1', N'4.31', N'0.91', N'2025-01-02 04:35:46.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'49', N'2', N'30.44', N'28.3', N'2025-01-02 03:35:20.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'50', N'3', N'27.72', N'22.57', N'2025-01-10 09:31:52.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'51', N'1', N'48.11', N'51.56', N'2025-01-06 21:27:56.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'52', N'1', N'21.8', N'96.32', N'2025-01-10 03:23:46.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'53', N'2', N'38.39', N'47.43', N'2025-01-08 12:42:42.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'54', N'2', N'19.6', N'2.45', N'2025-01-08 10:40:10.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'55', N'3', N'28.83', N'67.46', N'2025-01-04 17:25:35.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'56', N'1', N'46.71', N'87.84', N'2025-01-02 13:24:29.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'57', N'2', N'15.41', N'65.36', N'2025-01-01 14:01:58.000')
GO

INSERT INTO [dbo].[THRecords] ([Id], [SlaveId], [Temperature], [Humidity], [Creation]) VALUES (N'58', N'2', N'6.11', N'3.09', N'2025-01-10 20:31:09.000')
GO

SET IDENTITY_INSERT [dbo].[THRecords] OFF
GO


-- ----------------------------
-- Table structure for Users
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[Users]') AND type IN ('U'))
	DROP TABLE [dbo].[Users]
GO

CREATE TABLE [dbo].[Users] (
  [Id] char(36) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Mobile] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [Password] char(32) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [State] int DEFAULT 1 NOT NULL,
  [Name] nvarchar(20) COLLATE Chinese_PRC_CI_AS  NOT NULL,
  [RoleId] int  NOT NULL
)
GO

ALTER TABLE [dbo].[Users] SET (LOCK_ESCALATION = TABLE)
GO


-- ----------------------------
-- Records of Users
-- ----------------------------
INSERT INTO [dbo].[Users] ([Id], [Mobile], [Password], [State], [Name], [RoleId]) VALUES (N'2072ea17-7a22-4e67-9037-eb3c81d9c4a9', N'19959595655', N'2d13dd919b0ec4519c4a0967c4c7cd47', N'1', N'okok1', N'1')
GO

INSERT INTO [dbo].[Users] ([Id], [Mobile], [Password], [State], [Name], [RoleId]) VALUES (N'91b783d0-d72a-4be3-ae2f-6caaac9e58ba', N'19939591533', N'35309226eb45ec366ca86a4329a2b7c3', N'1', N'凡俊博', N'1')
GO

INSERT INTO [dbo].[Users] ([Id], [Mobile], [Password], [State], [Name], [RoleId]) VALUES (N'96391826-362f-45e6-8b95-578f4233c43f', N'19956123122', N'a2d10d355cdebc879e4fc6ecc6f63dd7', N'1', N'快乐星球', N'2')
GO

INSERT INTO [dbo].[Users] ([Id], [Mobile], [Password], [State], [Name], [RoleId]) VALUES (N'9DB40D98-47F0-458E-A16C-5F0A6FA53E15', N'18951100577', N'120d548dd68c19745f1a4f844cc81f7d', N'1', N'老刘', N'2')
GO

INSERT INTO [dbo].[Users] ([Id], [Mobile], [Password], [State], [Name], [RoleId]) VALUES (N'B2677A44-3775-4F63-B16D-E7A53E6A20EA', N'18951100599', N'7802913dc42d08478afcbc977e81b89e', N'1', N'老孙', N'1')
GO


-- ----------------------------
-- Auto increment value for Roles
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[Roles]', RESEED, 4)
GO


-- ----------------------------
-- Primary Key structure for table Roles
-- ----------------------------
ALTER TABLE [dbo].[Roles] ADD CONSTRAINT [PK_Role_Id] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Auto increment value for THRecords
-- ----------------------------
DBCC CHECKIDENT ('[dbo].[THRecords]', RESEED, 58)
GO


-- ----------------------------
-- Primary Key structure for table THRecords
-- ----------------------------
ALTER TABLE [dbo].[THRecords] ADD CONSTRAINT [PK_THRecord_Id] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO


-- ----------------------------
-- Primary Key structure for table Users
-- ----------------------------
ALTER TABLE [dbo].[Users] ADD CONSTRAINT [PK_User_Id] PRIMARY KEY CLUSTERED ([Id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

